<%@page import="aex.domain.ArticleCategory"%>
<%@page import="aex.domain.Article"%>
<%@page import="aex.service.ShowViewService"%>
<%@page import="aex.util.SSHUtil"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@page import="aex.domain.Puser"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
WebApplicationContext ac = SSHUtil.getApplication(request);
ShowViewService svService = (ShowViewService) ac.getBean(ShowViewService.SERVICE_NAME);
%>

<!DOCTYPE>
<html>
  <head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <meta name="keywords" content="${webKeyWord}">
	<meta name="description" content="${webDescription}" />
	<title> ${webTitle} </title>
	<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
  	
	<link rel="stylesheet" type="text/css" href="expandStyle/aex_userPage.css">
	<link rel="stylesheet" type="text/css" href="expandStyle/index.css" />
	<link rel="stylesheet" type="text/css" href="expandStyle/user_list.css" />
	
	<script type="text/javascript" src="systemJs/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="expandStyle/aex_userPage.js"></script>
	</head>
  <body>
    
    <!--导航栏-->
    
    <%
    	Puser user=(Puser)request.getSession().getAttribute("user");
    	if(user==null){
    		%>
    			<jsp:include page="/systemPage/headNavVisitor1.jsp"></jsp:include>		
    		<%
    	}else{
    		%>
				<jsp:include page="/systemPage/headNavVisitor2.jsp"></jsp:include>
    		<%
    	}
    %>
 <!--主要内容-->
  <div class="container">
    <div class="lists">
      <!--用户积分榜-->
       <div class="users_list">
          
          <div class="list_tittle">
             <h2>用户积分榜</h2>
             <span>积分</span>
          </div>
          
          <%
          	List<Puser> scores= svService.getTopScoreUser(6);
          	for(Puser xuser:scores){
          		out.print(
          				"<div class='list_content'>"+
				            "<img width='50' height='50' src='"+xuser.getPuPhoto()+"' align='left'>"+
				             "<a href='visitor/visitor_herHome.do?id="+xuser.getPuId()+"'>"+xuser.getPuName()+"</a>"+
				             "<span>"+xuser.getPuScore()+"</span>"+
				          "</div>"
          				);
          	}
          	
          %>
       </div>
         <!--用户关注榜-->
       <div class="users_list">
          <div class="list_tittle">
             <h2>用户关注榜</h2>
             <span>时间</span>
          </div>
          <%
          	List<Puser> fanss= svService.getTopFansUser(6);
          	for(Puser xuser:fanss){
          		out.print(
          				"<div class='list_content'>"+
				            "<img width='50' height='50' src='"+xuser.getPuPhoto()+"' align='left'>"+
				             "<a href='visitor/visitor_herHome.do?id="+xuser.getPuId()+"'>"+xuser.getPuName()+"</a>"+
				             "<span>"+xuser.getPuFans()+"</span>"+
				          "</div>"
          				);
          	}
          	
          %>
       </div>
         <!--活跃用户-->
       <div class="users_list">
          <div class="list_tittle">
             <h2>活跃用户</h2>
             <span>关注数</span>
          </div>
          <%
          	List<Puser> attentions= svService.getTopAttentionUser(6);
          	for(Puser xuser:attentions){
          		out.print(
          				"<div class='list_content'>"+
				            "<img width='50' height='50' src='"+xuser.getPuPhoto()+"' align='left'>"+
				             "<a href='visitor/visitor_herHome.do?id="+xuser.getPuId()+"'>"+xuser.getPuName()+"</a>"+
				             "<span>"+xuser.getPuAttention()+"</span>"+
				          "</div>"
          				);
          	}
          %>
       </div>
     </div>
  </div>
    <!--网站底部-->
	<jsp:include page="/systemPage/footerVisitor.jsp"></jsp:include>
  </body>
</html>
